package com.tjetc.dao;

import com.tjetc.entity.User;

import java.util.List;

/*
 * 用户相关的增删改查
 * */
public interface UserMapper {
    public List<User> findUser(User user);

    //添加用户
    Integer insert(User user);

    //根据id查找用户
    User selectById(Integer id);

    //更新用户密码
    int update(User user);

    //根据id删除用户
    int deleteById(Integer id);

    //登录
    User login(String username, String password);

    int updateImg(Integer id);


    public User selectByUser(String username);

    public List<User> selectAll();

    public Integer updateByAdmin();

    public List<User> selectByName();

    public List<User> selectByUserName();

    public Integer addUser(User user);

    public List<User> searchUserToPage(User user);

    public Integer deleteUsers(List<Integer> list);

    public Long countUserWaiting();

    User selectByPhone(String phone);
}
